package com.pet_service.exception;

/**
 * @author 邹全伸
 * @version 1.0
 * @date 2025-10-05 14:53
 */

import com.pet_service.result.ResultCodeEnum;

/**
 * 自定义业务异常类
 */
public class BusinessException extends RuntimeException {

    private ResultCodeEnum resultCodeEnum;

    public BusinessException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage());
        this.resultCodeEnum = resultCodeEnum;
    }

    public BusinessException(ResultCodeEnum resultCodeEnum, String message) {
        super(message);
        this.resultCodeEnum = resultCodeEnum;
    }

    public ResultCodeEnum getResultCodeEnum() {
        return resultCodeEnum;
    }
}
